[MUSIC] Hello and welcome to this demonstration
on using an effectivity in studio. [MUSIC] In this video, you will learn to
create a workflow that takes input from the user for
marks obtained in an examination, and informs whether the user
has passed the exam. So, let's begin. [MUSIC] Search for an input dialog activity
in the activities panel and drag and drop it in the designer panel. [MUSIC] Rename the automatically created
sequence as, if activity, and add an annotation to it. [MUSIC] Rename the input dialog activity is name. [MUSIC] In double quotes, enter the title text,
name, in the dialog title and label text. Enter your name in the input label box. [MUSIC] Navigate to the variables panel,
and create a variable called name. [MUSIC] With variable type is string and
set its scope to sequence, if activity. [MUSIC] Now, go to the properties
panel of the name. Input dialog activity and enter the name
variable in its result property. [MUSIC] Drag and drop another input dialog
activity below the first input dialog activity and rename it as marks. Enter the title text as
marks in the dialog title. [MUSIC] Also enter the label text as,
enter your marks and numeric value in the input label. [MUSIC] Navigate to the variables panel and
create a variable called, intMarks. Select the very able type as int32. Also said its scope to sequence,
if activity. [MUSIC] Go to the properties panel of
the second input dialog activity and enter the variable intMarks
in its result property. [MUSIC] Now, in certain effectivity below the second input dialog activity. [MUSIC] And rename it. [MUSIC] If activity will execute an expression
based on the predefined condition. Int condition intMarks greater than or
equal to 60. [MUSIC] Please make a note that the intMarks
variable is used here which was created earlier. Click show else to view the elf
section of the if activity. Insert to message box activities. [MUSIC] One in the then box and
another in the else box. [MUSIC] Rename the first message box activity. [MUSIC] Enter the text, congratulations. Plus name plus, you have passed the exam. [MUSIC] Like the previous message box activity,
rename this one, and enter text, hello plus name plus,
you have failed in the exam. [MUSIC] Please make a note of the use of double
quotes in both the message box activities. The variable name is used here
which was created previously. Click save to save the project. Now, select run from the debug file menu
on the design ribbon to run the project. [MUSIC] Enter the name of
a student in the name box, say John and click OK. [MUSIC] Now, in the marks input box enter 75 and
click OK. [MUSIC] The message box appears
on the screen saying, congratulations John you
have passed the exam. The reason for this message to appear is
the condition we defined earlier that if the marks are greater than or equal to 60,
the student has passed the exam and if the marks are less than 60,
the student has failed. And we have entered 75 that is
higher than the passing marks of 60. [MUSIC] Run the workflow again. [MUSIC] Enter the name of a student in
the name box, John and click OK. [MUSIC] This time in the marks input box,
enter 50 and click OK. [MUSIC] Now, the message box says hello John,
you have failed in the exam, which is as per the condition. [MUSIC] It is encouraged to follow the steps by
creating the workflow as demonstrated and familiarize yourself with using
the if activity in studio. Thank you for watching. [MUSIC]